package org.test.property;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class AppConfig {

	private String parameterA;

	private String parameterB;

	public String getParameterA() {
		return parameterA;
	}

	public void setParameterA(String parameterA) {
		this.parameterA = parameterA;
	}

	public String getParameterB() {
		return parameterB;
	}

	public void setParameterB(String parameterB) {
		this.parameterB = parameterB;
	}

	public AppConfig() {

		readConfig();
	}

	private void readConfig() {

		Properties p = new Properties();
		InputStream in = null;

		try {
			in = AppConfig.class.getResourceAsStream("AppConfig.properties");
			p.load(in);
			this.parameterA = p.getProperty("paramA");
			this.parameterB = p.getProperty("paramB");
			"".split(",");
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} finally {

			try {
				in.close();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}

	}

}
